package com.yc.sole.framework.mybatis.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import jakarta.persistence.Column;
import jakarta.persistence.MappedSuperclass;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * @author yizuomin
 * @date 2023/2/13 14:50
 **/
@Getter
@Setter
@ToString
@RequiredArgsConstructor
@MappedSuperclass
public abstract class BaseEntity {
    /**
     * 创建用户
     */
    @TableField(fill = FieldFill.INSERT)
    @Column(columnDefinition = "VARCHAR(32) COMMENT '创建用户id'")
    private Long createUserId;
    /**
     * 修改用户
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Column(columnDefinition = "VARCHAR(32) COMMENT '修改用户id'")
    private Long updateUserId;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Column(columnDefinition = "VARCHAR(20) COMMENT '创建时间'")
    private String createTime;
    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Column(columnDefinition = "VARCHAR(20) COMMENT '修改时间'")
    private String updateTime;
}
